怎么挑 embedding 模型How to Choose an Embedding Model
微型指南 · 约 8 分钟Guide · about 8 min · 引用核验 2026-11-03(仅引用链接与日期) · refs checked 2026-11-03 (reference links and dates only)
embedding 模型决定「意思相近」怎么算。挑错模型,后面检索、重排、回答全跟着吃亏。The embedding model decides how "similar in meaning" is computed. Pick it wrong and retrieval, reranking, and answering all suffer.
先看语种支持:中文任务要在中文或多语基准上看分数,英文榜好看不等于中文好用。
看维度与成本:维度高通常存储和计算更贵,按数据量估。
用 MTEB 这类基准初筛,再用自己数据实测,榜单只是起点。
查询与文档要同模型:混用不同模型算的向量,距离没有意义。
注意归一化口径:有的模型输出要归一化才能用余弦相似度。
换模型要重建索引:旧向量和新向量不兼容,迁移等于重算一遍。
Check language support first: for Chinese tasks, read scores on Chinese or multilingual benchmarks; a good English leaderboard says nothing about Chinese.
Weigh dimensions against cost: higher dimensions usually mean pricier storage and compute; estimate by data volume.
Screen with benchmarks like MTEB, then test on your own data; the leaderboard is only a starting point.
Queries and documents must use the same model: vectors from different models have no meaningful distance.
Mind normalization: some models require normalized outputs before cosine similarity is valid.
Switching models means rebuilding the index: old and new vectors are incompatible; migration means recomputing everything.
例子与判断Example and interpretation
以下是教学情境,不是本站运行或实测记录。A teaching scenario, not a measured or executed site test.
先备十几个真实查询,并人工标出应命中的文档。候选模型用同一批查询与文档建索引,比较命中、体积和耗时。换模型时重新计算文档向量,不把新查询向量直接接到旧索引。Prepare representative queries with known relevant documents. Index the same material for each candidate and compare retrieval, size and latency. Recompute document vectors when switching models rather than querying an old index with new vectors.
向量 / 嵌入Embedding / Vector 向量数据库Vector Database 联网 / 检索增强Retrieval-Augmented Generation, RAG
怎么给文档做分块How to Chunk Documents for Retrieval · 怎么给检索结果重排How to Rerank Retrieval Results · 怎么做混合检索How to Do Hybrid Search · 怎么评测 RAG 的效果How to Evaluate a RAG System